package com.bawei.mall.user.service.impl;

import com.bawei.mall.user.domain.Address;
import com.bawei.mall.user.mapper.AddressMapper;
import com.bawei.mall.user.service.AddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AddressServiceImpl implements AddressService {
    @Autowired
    private AddressMapper addressMapper;

    /**
     * 查询所有地址
     * @return
     */
    @Override
    public List<Address> findAllAddress() {
        return addressMapper.findAllAddress();
    }


    /**
     * 获取地址
     * @param address
     * @return
     */
    @Override
    public void addDetil(Address address) {
        addressMapper.addDetil(address);
    }

    @Override
    public Address findById(Integer id) {
        return addressMapper.findById(id);
    }

    @Override
    public void updateAddress(Address address) {
        addressMapper.updateAddress(address);
    }

    @Override
    public void showAddress(Integer id) {
        addressMapper.showAddress(id);
    }
}
